PreviousNextTracker indexSee it online !

(145/185) 333 - Navigator: Store location by line + offset in line rather than offset in file

Navigator currently stores the history positions with an offset into the entire file (and the line number). The problem is, if you are actively editing the file, the history positions get off and the plugin becomes worthless.

I think it would be better to store line and offset into the line instead. Then, if I make a line near the top of the file far longer or shorter, it wouldn't matter, navigator would still get me where I want to go. Obviously, if a history location is in a modified line, beyond the current length of the line, navigator would have no choice but to go to the last position on the line, but that's simple.

To make it even better, and deal well with added, changed, and removed lines, Navigator could use the stored line text to refine the position of the jump by doing a quick regex search of a programmable number of lines before and after the target, to try and find a moved target position. It seems likely that, for speed reasons, this feature might need to be selectable.

Submitted snarum-micron - 2014-01-08 20:37:17.288000 Assigned daleanson
Priority 5 Labels Navigator
Status open Group
Resolution None

Comments

2014-08-25 02:34:14.794000
ezust

- **assigned_to**: Dale Anson
- **Group**: -->